﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Net.Mail;

namespace FifaGamer
{
    /// <summary>
    /// Summary description for Email
    /// </summary>
    public static class Email
    {

        public static bool Send_Email(string to, string from, string subject, string message)
        {
            MailMessage mail = new MailMessage(from, to);
            mail.Subject = subject;
            mail.Body = message;
            mail.IsBodyHtml = true;

            SmtpClient client = new SmtpClient("mail.peslegends.co.za", 25);
            client.Credentials = new System.Net.NetworkCredential("info@peslegends.co.za", "Info1234");
            //client.UseDefaultCredentials = true;
            
            client.Send(mail);
            return true;
        }
    }
}